<?php
/**
 * Created by PhpStorm.
 * @author: 汤文辉
 * @since: 2017/6/19 23:20
 * 随机搜索图书，并进行显示
 */
include 'config/mysqlconfig.php';
include 'class/Book.php';
$i = 0;
for ($i=0; $i < 4; ++$i) { 
	$book_id = rand(1001,1015);
	$b = new Book($con);
	if($book_id){
    	$book[$i] = $b->getBookInfo($book_id);//获得图书信息
	}	
}
$con->close();